{extend name="base"}
{block name="title"}在线用户统计{/block}
{block name="head"}{/block}
{block name="body"}
<body class="mainbody">
<form>
<!--导航栏-->
<div class="location">
  <a href="javascript:history.back(-1);" class="back"><i class="iconfont icon-up"></i><span>返回上一页</span></a>
  <a href="{:url('index/home')}" class="home"><i class="iconfont icon-home"></i><span>首页</span></a>
  <i class="arrow iconfont icon-arrow-right"></i>
  <span>在线用户统计</span>
</div>
<!--/导航栏-->

<!--工具栏-->
<div id="floatHead" class="toolbar-wrap">
  <div class="toolbar">
    <div class="box-wrap">
      <a class="menu-btn"><i class="iconfont icon-more"></i></a>
      <div class="l-list">
        <div class="menu-list">
          <div class="rule-single-select">
            <select name="channel" style="display:none">
              <option value="-1">===所有渠道===</option>
              {volist name="CHANNELS" id="val"}
              <option value="{$key}"{eq name="channel" value="$key"} selected{/eq}>[{$key}]{$val.Name}</option>
              {/volist}
            </select>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<!--/工具栏-->

<div class="table-container">
  <table border="0" cellspacing="0" cellpadding="0" class="border-table ltable" style="width:auto">
    <thead>
      <tr>
        <th>#</th>
        <th>渠道</th>
        <th>推广员</th>
        <th>在线人数#{$TotalOnline|default=0}</th>
      </tr>
    </thead>
    <tbody>
{empty name="list"}
      <tr><td colspan="4">Oh~暂无数据!</td></tr>
{else}
  {volist name="list" id="v"}
      <tr>
        <td>{$i}</td>
        <td title="{$v.Channel}">{$CHANNELS[$v.Channel]['Name'] ?? '--'}</td>
        <td  class="user-avatar">
          <a target="_blank" href="{:url('user.detail/index')}?UserID={$v.UserID}">
            <img src="{$v.HeadImgUrl?:'__STATIC__/houtai/images/dface.png'}" />
          </a>
          <div class="user-box">
            <h4><a target="_blank" class="red" href="{:url('user.detail/index')}?UserID={$v.UserID}">{:htmlentities($v.Compellation)}</a></h4>
            <i>{$v.GameID}</i>
          </div>
        </td>
        <td><a target="_blank" href="{:url('user.online/index')}?yqcode={$v.GameID}&channel={$channel}">{$v.TotalCount|default=0}</a></td>
      </tr>
  {/volist}
{/empty}
    </tbody>
  </table>
</div>

<!--内容底部-->
<div class="page-footer"><div class="btn-wrap">{$list->render()}</div></div>
<!--/内容底部-->

</form>
</body>
{/block}